﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace Niagara.Sample.Web
{
  [MetadataType(typeof(GameMetadata))]
  public partial class Game
  {

  }

  public class GameMetadata
  {
    [Required(ErrorMessage="Name is required!")]
    [StringLength(100)]
    [DisplayName("Game Name")]
    [Description("This is the name of the game.")]
    public string Name { get; set; }

    public string Description { get; set; }

    [Range(0d, 2000d)]
    public decimal Price { get; set; }

  }
}
